package com.zzw.service.impl;

import com.zzw.service.UserService;
import com.zzw.dao.UserMapper;
import com.zzw.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    public void addUser(User user) {
        userMapper.insertSelective(user);
    }

    public User query(Long id){
        return userMapper.selectByPrimaryKey(id);
    }
}
